package test_03_01.factory;

import test_03_01.dao.SumDao;
import test_03_01.dao.impl.ExceptImpl;
import test_03_01.dao.impl.ReduceImpl;
import test_03_01.dao.impl.RideImpl;
import test_03_01.dao.impl.SumDaoImpl;

public class SumDaoFactory implements SumFactory{

    public static SumDao getInfo(String num) {
        switch (num){
            case "+":
                return new SumDaoImpl();
            case "-":
                return new ReduceImpl();
            case "*":
                return new RideImpl();
            case "/":
                return new ExceptImpl();
            default:
                return null;
        }
    }

    @Override
    public SumDao getInfo() {
        return new SumDaoImpl();
    }
}
